#ifndef GOBANGWIDGET_H
#define GOBANGWIDGET_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMessageBox>
#include "chessboardwidget.h"

class GobangWidget : public QWidget
{
    Q_OBJECT

public:
    GobangWidget(QWidget* parent = nullptr);
    ~GobangWidget();

private slots:
    void onRestartClicked();
    void onRegretClicked();
    void onAIClicked();
    void onGameStateChanged(bool isBlackTurn);
    void onGameOver(int winner);
    void onGameTimeUpdated(int seconds);

private:
    void initUI();
    void setupStyles();

    // 控件
    ChessBoardWidget* m_chessBoard;
    QPushButton* m_restartBtn;
    QPushButton* m_regretBtn;
    QPushButton* m_aiBtn;
    QLabel* m_statusLabel;
    QLabel* m_timerLabel;

    // 布局
    QVBoxLayout* m_mainLayout;
    QHBoxLayout* m_controlLayout;
};

#endif // GOBANGWIDGET_H